home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / DINKDEMO / DINKCLAS / DWINDOW.H < prev   
Text File  |  1992-07-08  |  2KB  |  91 lines

  1. /*
  2.     File:        DWindow.h
  3.  
  4.     Written by:    Mark Gross
  5.  
  6.     Copyright:    ⌐ 1992 by Applied Technical Software, all rights reserved.
  7.     Use at your own risk.
  8.  
  9. */
  10.  
  11. // This is the class declaration of the DWindow object
  12.  
  13. #ifndef __DWINDOW__
  14. #define __DWINDOW__
  15.  
  16. #include "DEventHandler.h"
  17. #include <Printing.h>
  18.  
  19. class DDocument;    
  20.  
  21.                     
  22.  
  23. class DWindow : public DEventHandler
  24. {
  25. protected:
  26.  
  27.     short            fVOffSet;
  28.     short            fHOffSet;
  29.         
  30.     THPrint            fPrintRecord;
  31.  
  32. public:
  33.  
  34.     DDocument *fDoc;
  35.  
  36.     WindowPtr fWindowPtr;
  37.         
  38.     DWindow(void);
  39.  
  40.     ~DWindow(void);
  41.     
  42.     virtual Boolean Init(DDocument *doc, Boolean hasColorWindows);
  43.     
  44.     virtual void    FocusOnContent(void);    
  45.  
  46.         
  47.     void    FocusOnWindow(void);
  48.     
  49.     void    GetContentRect(Rect *r);
  50.  
  51.     virtual void Draw( Rect *area);
  52.     
  53.     virtual void KillMeNext(void);
  54.     virtual void Close(void);
  55.  
  56.     virtual void HandleMouseDown(EventRecord *theEvent, short thePart, WindowPtr theWindow);
  57.  
  58.     virtual void HandleUpdateEvt(EventRecord *theEvent);
  59.     virtual void HandleActivateEvt(EventRecord *theEvent);
  60.     
  61.     void SetWindowTitle(void);
  62.     
  63. protected:
  64.     virtual void DoDrag(EventRecord *theEvent);
  65.     virtual void DoGrow(EventRecord *theEvent);
  66.     virtual void DoZoom(short thePart);
  67.     
  68.     virtual void DoContent(EventRecord *theEvent);
  69.  
  70. public:
  71.  
  72.     virtual void DoPageSetUp(void);
  73.     virtual void DoPrint(void);
  74.  
  75.  
  76. };// end of class declaration for the DWindow Class of objects
  77.  
  78. #define rWindowID 1000
  79. #define kStagger    20
  80. #define MINHIGHT    75
  81. #define MINWIDTH    75
  82.  
  83. #define rHScroll    1
  84. #define rVScroll    2
  85. #define kScrollOverlap    16
  86.  
  87. #define kScrollBarWidth    16
  88. #define kScrollBarPos    15
  89.  
  90. #endif __DWINDOW__
  91.